<!-- 二级页面的页面自适应缩进类（可根据不同屏幕类型缩进相应的尺寸） -->
<template>
  <div class="seconPageMarginContainer">
    <div class="margin" :style="getMarginStyle">
      <slot></slot>
    </div>
  </div>
</template>
<script>
import {
  WIDTH_PHONE,
  PHONE_RATIO,
  WIDTH_SPREADED,
  SPREADED_RATIO,
  WIDTH_PAD_PORTRAIT,
  PAD_PORTRAIT_RATIO,
  WIDTH_PAD_LANDSCAPE,
  PAD_LANDSCAPE_RATIO,
  WIDTH_STANDARD,
  SPREADED_SCREEN_RATIO,
  selectWidth,
  flexibleWidth,
  flexibleHeight,
  screenDpr,
  screenType,
  screenDescription,
  isIOS,
  isSpreadOn,
  screenSize,
  getSecondPageStyle,
  getDialogFlexAlign,
  getDialogStyle,
  getSingleButtonStyle,
  setScreenResizeListener,
  itemWidth,
} from "../../../../assets/js/flexible.js";
export default {
  props: {
    deviceTypePro: {
      type: Number,
      default: 1,
    },
  },
  data() {
    return {
      deviceType: 1,
    };
  },
  mounted() {
    this.deviceType = screenType;
    // setScreenResizeListener(this.updateScreenResize);
  },
  watch: {
    deviceTypePro(newVal) {
      this.deviceType = newVal;
    },
  },
  computed: {
    getMarginStyle() {
      return getSecondPageStyle(this.deviceType);
    },
  },
  methods: {
    // updateScreenResize(newScreenType) {
    //   // console.log("SecondPageMargin: ");
    //   this.deviceType = newScreenType;
    // },
  },
};
</script>
<style scoped>
.seconPageMarginContainer {
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  display: flex;
}
.seconPageMarginContainer .margin {
  height: 100%;
}
</style>
